package br.ufpi.die.cSql.teste;

import gals.LexicalError;
import gals.Lexico;
import gals.SemanticError;
import gals.Semantico;
import gals.Sintatico;
import gals.SyntaticError;




public class Main {

	public static void main(String[] args) {
		
		Lexico lexico = new Lexico("PI [bi, nome] ( SIGMA [salario - descontos > 500] (empregado) )");
		
		Sintatico sintatico = new Sintatico();
		
		Semantico semantico = new Semantico();
		
		try {
			sintatico.parse(lexico, semantico);
		} catch (LexicalError e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SyntaticError e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SemanticError e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		System.out.println(sintatico.getPilhaSql());
		
	}




}
